import java.util.Scanner;
public class ByteDance {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入一个整数：");
        int number = scanner.nextInt();
        int evenBits = 0;
        int oddBits = 0;
        int temp = number;
        for (int i = 0; i < Integer.SIZE; i += 2) {
            if ((temp & (1 << i)) != 0) {
                evenBits |= 1 << i;
            }
        }
        for (int i = 1; i < Integer.SIZE; i += 2) {
            if ((temp & (1 << i)) != 0) {
                oddBits |= 1 << i;
            }
        }
        System.out.print("偶数位的二进制序列：");
        for (int i = Integer.SIZE - 1; i >= 0; i--) {
            if ((evenBits & (1 << i)) != 0) {
                System.out.print("1");
            } else {
                System.out.print("0");
            }
        }
        System.out.println();
        System.out.print("奇数位的二进制序列：");
        for (int i = Integer.SIZE - 1; i >= 0; i--) {
            if ((oddBits & (1 << i)) != 0) {
                System.out.print("1");
            } else {
                System.out.print("0");
            }
        }
        System.out.println();
        scanner.close();
    }
}
